import axios from '@/libs/api.request'

/**
 * 新增海关政策
 */
export const addPolicy = function (data) {
    return axios.request({
        url: '/policy/add',
        data: data,
        method: 'post'
    })
}

/**
 * 修改海关公告
 */
export const updatePolicy = function (data) {
    return axios.request({
        url: '/policy/update',
        data: data,
        method: 'post'
    })
}

/**
 * 删除海关政策
 */
export const deletePolicy = function (id) {
    return axios.request({
        url: '/policy/delete',
        params: { id },
        method: 'get'
    })
}

/**
 * 查询海关政策详情
 */
export const queryPolicyInfo = function (id) {
    return axios.request({
        url: '/policy/info',
        params: { id },
        method: 'get'
    })
}

/**
 * 查询海关政策列表
 */

export const queryPolicyList = function (data) {
    return axios.request({
        url: '/policy/list',
        data,
        method: 'post'
    })
}

/**
 * 首页海关政策查询
 * @param {*} data
 */
export const queryPolicyNotice = function (data) {
    return axios.request({
        url: '/policy/homePage/list',
        data,
        method: 'post'
    })
}
